package com.example.springbootwebsosket.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
public class WebSocket {
    //自己给自己发消息
    @GetMapping({"/index","/"})
    public String index(){
        return "index";
    }
    //自己给所有客户端发送消息
    @GetMapping({"/sendAllClient"})
    public String sendAllClient(){
        return "sendAllClient";
    }
    //自己给别的客户端发送消息
    @GetMapping({"/sendOtherClient"})
    public String sendOtherClient(){
        return "sendOtherClient";
    }
}
